package com.zhx.learn.rabbitmq.message;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 *describe: fanout 定义模式
 *
 *@author zhanghaixuan
 *@date 2018/11/16
 **/
@Component
public class Receiver {

	@RabbitListener(queues = "#{autoDeleteQueue0.name}")
	public void receiver0(String str) {
		System.out.println("receiver0++++++++++:" + str);
	}

	@RabbitListener(queues = "#{autoDeleteQueue1.name}")
	public void receiver1(String str) {
		System.out.println("receiver1++++++++++:" + str);
	}
}

